Skip to content

Fix flaky pipe auto split IT#17756

Merged
jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:fix-pipe-auto-split-it
May 27, 2026
Merged

Fix flaky pipe auto split IT#17756
jt2594838 merged 1 commit into
apache:masterfrom
Caideyipi:fix-pipe-auto-split-it

Conversation

@Caideyipi
Copy link
Copy Markdown
Collaborator

Motivation

IoTDBPipeAutoSplitIT assumes that auto split always leaves both history and realtime pipes visible immediately after creation. In practice, the history snapshot pipe can finish and be auto-dropped very quickly when there is no historical data, so SHOW PIPE may only return the realtime pipe and the test fails with expected 2 but was 1.

Modifications

  • Relax the auto split assertion to require the realtime pipe and reject the original unsplit pipe.
  • Allow the history pipe to be absent after automatic completion/drop.
  • Keep validating the history pipe's sink option when that history pipe is still visible.

Tests

  • Passed: git diff --check -- integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/treemodel/auto/basic/IoTDBPipeAutoSplitIT.java
  • Not run successfully locally: IoTDBPipeAutoSplitIT#testSingleEnv. Maven/JVM failed during compilation on this machine due Windows page file/native memory exhaustion.

@jt2594838 jt2594838 merged commit bc150ff into apache:master May 27, 2026
41 checks passed
@jt2594838 jt2594838 deleted the fix-pipe-auto-split-it branch May 27, 2026 07:49
luoluoyuyu

This comment was marked as outdated.

Copy link
Copy Markdown
Member

@luoluoyuyu luoluoyuyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary

Replaces brittle assertions (exactly two pipes in a fixed order) with assertAutoSplitResult, which matches auto-split behavior when the history pipe may already be dropped after snapshot transfer.

Looks good to merge.

// The history pipe may have already been auto-dropped after snapshot transfer completes.
Assert.assertTrue(
showPipeResult.stream().anyMatch(i -> Objects.equals(i.id, pipeName + "_realtime")));
Assert.assertFalse(showPipeResult.stream().anyMatch(i -> Objects.equals(i.id, pipeName)));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Assert.assertFalse(showPipeResult.stream().anyMatch(...)) can be written as assertTrue(showPipeResult.stream().noneMatch(i -> Objects.equals(i.id, pipeName))) for readability. Not blocking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants